<?php

/**
 * @author christian
 * @copyright 2011
 * @abstract carga de todo el itinerario que es parte de un tour del itenario del tour
 */
 


$ruta=$_SERVER['DOCUMENT_ROOT']."/viventura"."/MDTour";
include_once("$ruta/conf/CConfig.php");
include_once("$ruta/elements/head.tpl");
include_once("$ruta/MDTourGeneral/CTourTableDraw.php");
include_once("$ruta/MDTourGeneral/CDrawPageReg.php");
include_once("CTransporteTable.php");
include_once("$ruta/star.php");
include_once("$ruta/view/CDrawMenuTour.php");

$items=array("Nuevo Tour"=>"../MDTour/MDTourGeneral/CSmallDefinePack.php","Nuevo paquete"=>"../MDTour/MDTourGeneral/CTourEdit.php?codigo=159&default=2","Ver paquetes"=>"/viventura/MDTour/","Otra"=>"g");

CDrawMenuTour::getInstance()->setMenu($items);
CDrawMenuTour::getInstance()->rigth_side_begin();//empieza lado derecho 
CDrawMenuTour::getInstance()->DrawDivAdBegin("content_area_user_title","1");echo "<h1>Destino Sur</h1>";
CDrawMenuTour::getInstance()->DrawDivAdEnd();



$title="Transportes";
$maintable="transporte"; 
$growtable="pack_has_tour";


if (!isset($_POST['updated'])) {$_POST['updated'] = "NULL"; }
$updated = $_POST['updated'];
if($updated!="NULL"){echo "El paquete $updated fue actualizado";}
else{echo "";}

$columnas=array("idTrans"=>"Identificador","NamEmp"=>"Nombre","FirstConEmp"=>"Nombre de contacto","PhoEmp"=>"Teléfono","WebPagEmp"=>"Página web","MaiEmp"=>"Mail");
//CTourTableDraw::getInstance()->DrawTable($title,$maintable,$columnas);
CTransporteTable::getInstance()->DrawTable($title,$maintable,$growtable,$columnas);


echo "<p align='right'>";
CDrawPageReg::getInstance()->DrawButton("Añadir servicio", "CTransporteServicio.php");
echo "</p>";
/////////////////Area de registro /////////////////////
CDrawPageReg::getInstance()->DrawHideSectionBeg();
    
    echo "<p align='center'>";
    $action="CRegistroTransporte.php?default=1";$name="formulario_registro";$method="post";$NAME="Registro de operadores de transporte";
    CDrawPageReg::getInstance()->DrawHead($action,$name,$method,$NAME);
    echo "</p>";
    CDrawPageReg::getInstance()->readOnly("transporte","idTrans");
    
    echo "<h2>Tipo de transporte</h2>";
    echo "<div id='dashboard_info'>";

    $campos = array("idMed"=>"idMed", "NamMed"=>"NamMed");
    CDrawPageReg::getInstance()->DrawSelect("medio", $campos, "Tipo","MEDIO_idMed");

	
// 		ClasEmp

    echo "</div>";
    
    $val_transporte = array (":required",":url",":email");
    $transporte = array("NamEmp"=>"Nombre de la empresa","WebPagEmp"=>"Página web");
    CDrawPageReg::getInstance()->DrawTextBox($transporte,$val_transporte);
    
    $val_ctransporte = array (":required",":required");
    $ctransporte = array("FirstConEmp"=>"Nombre del contacto","LastConEmp"=>"Apellido del contacto");
    CDrawPageReg::getInstance()->DrawTextBox($ctransporte,$val_ctransporte);
    
    $val_ttransporte = array (":integer",":integer",":integer");
    $ttransporte = array("PhoEmp"=>"Teléfono","FaxEmp"=>"Fax","CodPosEmp"=>"Código Postal");
    CDrawPageReg::getInstance()->DrawTextBox($ttransporte,$val_ttransporte);
    
    
      
    echo "<p align='right'>";
    CDrawPageReg::getInstance()->DrawSubmmit("Añadir");
    echo "</p>";
    echo "</div>";

CDrawPageReg::getInstance()->DrawHideSectionEnd("Añadir empresa de transporte / Ocultar");

////////////Fin del area de registro////////////////
?>